package com.example.water_quality_analysis.config;

import co.elastic.clients.elasticsearch.ElasticsearchClient;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate;

@Configuration
public class ESConfig {
    @Resource
    private ElasticsearchClient client;

    @Bean
    public ElasticsearchTemplate elasticsearchTemplate(){
        return new ElasticsearchTemplate(client);
    }
}
